<template>
    <div>
        <!--<el-header height="30%">-->
        <!--</el-header>-->
        <el-tabs :stretch="false" v-model="activeName">
            <el-tab-pane label="员工班次" name="empcls">
                <manage-panel ref="managePanel" :fatherMethodShowSub="funShowSub" :tableHeight="'200px'"></manage-panel>

            </el-tab-pane>

            <el-tab-pane style="margin-right: 10px" label="员工名单" name="emp">
                <manage-panel-sub ref="managePanelSub"></manage-panel-sub>

            </el-tab-pane>
        </el-tabs>
    <!--<el-main width="60%">-->
        <!--<el-tabs   :stretch="false" v-model="activeName">-->
        <!--<el-tab-pane label="员工名单" name="emp">-->

        <!--</el-tab-pane>-->

        <!--<el-tab-pane style="margin-right: 10px" label="员工班次" name="empcls">-->
            <!--<manage-panel-sub ref="managePanelSub"></manage-panel-sub>-->

        <!--</el-tab-pane>-->
        <!--</el-tabs>-->
    <!--</el-main>-->
</div>

</template>
<script>

    import ManagePanel from './Manage';
    import ManagePanelSub from './ManageSub';

    export default {
        components: {ManagePanel, ManagePanelSub},
        data() {
            return {
                activeName:'empcls',
                collapse: false,
                parentId : -1
            }
        },

        methods: {
            tabClick(tab) {

            },
            funShowSub(row) {
                this.parentId = row.classMasterId;
                console.log("show sub");

                this.$refs.managePanelSub.init({parent :row,parentId: row.classMasterId});

            }
        },


        mounted() {
            this.$refs.managePanel.init({parentId: 0});
            // this.$refs.managePanelSub.init({parentId: -1});


        }
    }
</script>
